home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 December
/
PCWorld_2007-12_cd.bin
/
domacnost a kancelar
/
autoit
/
autoit-v3-setup.exe
/
Examples
/
Helpfile
/
_IELinkClickByText.au3
< prev
next >
Wrap
Text File
|
2007-09-08
|
911b
|
27 lines
; *******************************************************
; Example 1 - Open browser with basic example, click on the link
; with text "user forum"
; *******************************************************
;
#include <IE.au3>
$oIE = _IE_Example ("basic")
_IELinkClickByText ($oIE, "user forum")
; *******************************************************
; Example 2 - Open browser to the AutoIt homepage, loop through the links
; on the page and click on the link with text "wallpaper"
; using a sub-string match.
; *******************************************************
;
#include <IE.au3>
$oIE = _IECreate("http://www.autoitscript.com")
$sMyString = "wallpaper"
$oLinks = _IELinkGetCollection($oIE)
For $oLink in $oLinks
$sLinkText = _IEPropertyGet($oLink, "innerText")
If StringInStr($sLinkText, $sMyString) Then
_IEAction($oLink, "click")
ExitLoop
EndIf
Next